<template>
  <div class="no-data-container">
    <div class="no-data-image">
      <img src="@/assets/images/user/nodata.png" alt="No Data" />
    </div>
    <div class="no-data-text">
      <div class="divider"></div>
      <div class="text">{{ showText }}</div>
      <div class="divider"></div>
    </div>
  </div>
</template>

<script setup>
const { t } = useI18n()
const props = defineProps({
  text: String
})
// 计算实际要显示的文本
const showText = computed(() => props.text ?? t('user-coupon_noData'))
</script>

<style lang="less" scoped>
.no-data-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  width: 100%;
}

.no-data-image {
  width: 180px;
  height: 180px;
  margin-bottom: 20px;
  
  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

.no-data-text {
  display: flex;
  align-items: center;
  color: rgba(246, 224, 202, 0.7);
  font-size: 14px;
  
  .divider {
    width: 30px;
    height: 1px;
    background-color: rgba(246, 224, 202, 0.3);
  }
  
  .text {
    margin: 0 10px;
  }
}
</style> 